xen: arm: allocate dom0 memory separately from preparing the dtb
authorIan Campbell <ian.campbell@citrix.com>
Tue, 19 Nov 2013 13:00:12 +0000 (13:00 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 19 Nov 2013 16:40:56 +0000 (16:40 +0000)
commit8da14b8c549094f9851c6844f052676a98c3a150
tree2df84d712f1f24d1f054ee303973092ff283585a
parent1c08d6004ea7973332631946b5a0ebb0858eaec4
xen: arm: allocate dom0 memory separately from preparing the dtb

Mixing these two together is a pain, it forces us to prepare the dtb before
processing the kernel which means we don't know whether the guest is 32- or
64-bit while we construct its DTB.

Instead split out the memory allocation (including 1:1 workaround handling)
and p2m setup into a separate phase and then create a memory node in the DTB
based on the result.

This allows us to move kernel parsing before DTB setup.

As part of this it was also necessary to rework where the decision regarding
the placement of the DTB and initrd in RAM was made. It is now made when
loading the kernel, which allows it to make use of the zImage/ELF specific
information and therefore to make decisions based on complete knowledge and do
it right rather than guessing in prepare_dtb and relying on a later check to
see if things worked.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Julien Grall <julien.grall@linaro.org>
xen/arch/arm/domain_build.c
xen/arch/arm/kernel.c
xen/arch/arm/kernel.h